Page({
    data: {
        msg: "hello malu",
        site: "http://www.baidu.com",
        age: 100,
        showColor: true,
        isShow: true,
        score: 50,
        singers: ["陈明", "辛晓琪", "齐秦", "羽泉", "林志炫", "杨宗纬"],
        imgPath: ""
    },
    onToggle() {
        // this.data.showColor = !this.data.showColor
        // this.setState({xxx})
        this.setData({
            showColor: !this.data.showColor
        })
    },
    onToggle2() {
        this.setData({
            isShow: !this.data.isShow
        })
    },
    handleChooseAlbum() {
        wx.chooseImage({
            count: 1,
            sourceType: ["album", "camera"],
            success: res => {
                let file = res.tempFilePaths;
                this.setData({
                    imgPath: file
                })
            }
        })
    }
})